package org.zxn.study.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.zxn.study.req.LoginReq;
import org.zxn.study.rsp.LoginResp;
import org.zxn.study.service.UserLoginService;

/**
 * @ClassName LoginController
 * @Description: 登录控制层
 * @Author zxn
 * @Date 2025/7/10 11:28
 **/

@RestController
@RequestMapping("/api")
public class LoginController {
    @Autowired
    private UserLoginService userService;


    @PostMapping("/login")
    public LoginResp login(@RequestBody LoginReq loginReq){
        return userService.login(loginReq);
    }


}
